package com.blq.web.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.blq.common.core.domain.BaseEntity;
import com.blq.common.core.domain.TreeEntity;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 钱包明细对象 user_money_item
 *
 * @author zeh
 * @date 2023-06-25
 */
@Data
@TableName("user_money_item")
public class UserMoneyItem {

    private static final long serialVersionUID=1L;

    /**
     * 明细ID
     */
    @TableId(value = "item_id")
    private Long itemId;
    /**
     * 对象ID
     */
    private Long objId;
    /**
     * 对象名称
     */
    private String objName;
    /**
     * 对象类型（1个人 2公司）
     */
    private Integer objType;
    /**
     * 标题
     */
    private String title;
    /**
     * 内容
     */
    private String content;
    /**
     * 类别（1分成 2提现）
     */
    private Integer type;
    /**
     * 途径（0钱包 1微信 2支付宝 3银行卡）
     */
    private Integer classify;
    /**
     * 金额
     */
    private BigDecimal money;
    /**
     * 状态（1待支付 2已到账 3取消）
     */
    private Integer state;
    /**
     * 关联ID
     */
    private Long relationId;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 订单ID
     */
    private Long orderId;

    public UserMoneyItem(Long objId, String objName, Integer objType, String title, String content, Integer type, Integer classify, BigDecimal money, Integer state, Long relationId, Long orderId) {
        this.objId = objId;
        this.objName = objName;
        this.objType = objType;
        this.title = title;
        this.content = content;
        this.type = type;
        this.classify = classify;
        this.money = money;
        this.state = state;
        this.relationId = relationId;
        this.orderId = orderId;
        this.createTime = new Date();
    }

    public UserMoneyItem(Long objId, String objName, Integer objType, String title, String content, Integer type, Integer classify, BigDecimal money, Integer state) {
        this.objId = objId;
        this.objName = objName;
        this.objType = objType;
        this.title = title;
        this.content = content;
        this.type = type;
        this.classify = classify;
        this.money = money;
        this.state = state;
        this.createTime = new Date();
    }

    public UserMoneyItem(Long objId, String objName, Integer objType, String content, BigDecimal money, Long orderId, Integer classify) {
        this.objId = objId;
        this.objName = objName;
        this.objType = objType;
        this.content = content;
        this.money = money;
        this.orderId = orderId;
        this.title = "订单结算";
        this.type = 1;
        this.classify = classify;
        this.state = 1;
        this.createTime = new Date();
    }

    public UserMoneyItem(Long objId, String objName, Integer objType, String content, BigDecimal money, Long orderId, Integer state, Integer classify) {
        this.objId = objId;
        this.objName = objName;
        this.objType = objType;
        this.content = content;
        this.money = money;
        this.orderId = orderId;
        this.state = state;
        this.classify = classify;
        this.title = "订单结算";
        this.type = 1;
        this.createTime = new Date();
    }

    public UserMoneyItem() {

    }
}
